import Vue from 'vue'
import Router from 'vue-router'
import Home from '../pages/Home/Home'
import Recommend from '../pages/Recommend/Recommend'
import Chat from '../pages/Chat/Chat'
import PersonalCenter from '../pages/PersonalCenter/PersonalCenter'
import Search from '../pages/Search/Search'
import homeWomen from '../pages/Home/components/women'
import homeGoods from '../pages/Home/components/goods'
import homeHot from '../pages/Home/components/hot'
import Setting from '../pages/PersonalCenter/components/Setting.vue'
import UserInfo from '../pages/PersonalCenter/components/UserInfo.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/home',
      component: Home,
      children: [
        {
          path: 'hot',
          component: homeHot,
          meta: {
            footerShow: true
          }
        },
        {
          path: 'women',
          component: homeWomen
        },
        {
          path: 'goods',
          component: homeGoods
        },
        {
          path: '/home',
          redirect: 'hot'
        }
      ],
      meta: {
        footerShow: true
      }
    },
    {
      path: '/recommend',
      component: Recommend,
      meta: {
        footerShow: true
      }
    },
    {
      path: '/search',
      component: Search,
      meta: {
        footerShow: true
      }
    },
    {
      path: '/chat',
      component: Chat,
      meta: {
        footerShow: true
      }
    },
    {
      path: '/personal',
      component: PersonalCenter,
      meta: {
        footerShow: true
      }
    },
    {
      path: '/setting',
      component: Setting,
      meta: {
        footerShow: false
      }
    },
    {
      path: '/userinfo',
      component: UserInfo,
      meta: {
        footerShow: false
      }

    },
    {
      path: '/',
      redirect: '/home'
    }
  ]
})
